package com.rimi.commons;

/**
 * @Author luc
 * @Date 2021/6/7
 */
public enum ResultStatus implements ResultCode {

    /**
     *  系统请求状态枚举类
     */
    OK(1001,"请求成功"),
    ERROR(1002,"系统异常,请联系管理员"),
    LOGIN_FAILED(1003,"密码错误"),
    AUTH_FAILED(1004,"认证失败"),
    ROLE_AUTH_FAILED(1005,"角色校验失败"),
    PERMS_AUTH_FAILED(1005,"权限校验失败"),
    MESSAGE_FAILED(1006,"短信发送失败"),
    GETMESSAGE_FAILED(1007,"获取验证码失败"),
    ADD_SUCCESS(1008,"添加成功"),
    NOTFIND_USER(1009,"用户名不存在"),
    EMAIL_ADD_FAILED(1010,"注册邮箱已存在"),
    PHONE_ADD_FAILED(1011,"注册手机号码已存在"),
    COMPANY_ADD_FAILED(1012,"注册公司已存在"),
    CADD_FAILED(2000,"公司信息添加失败"),
    INVOICE_FAILED(2005,"开具发票失败"),
    ADD_FAILED(2001,"添加失败"),
    DELETE_FAILED(2002,"删除失败"),
    UPDATE_FAILED(2003,"编辑失败"),

    SEARCH_FAILED(2004,"没有查询到商品"),

    PAY_FAILED(3001,"支付失败"),

    TYPE_ERROR(3002,"类型错误"),

    NOT_FIND_ADDRESS(4001,"请先添加收货地址");



    int code;

    String msg;

    ResultStatus(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
